package com.yym.socket;

import java.io.IOException;
import java.io.InputStream;

public class GetOutPut {

	public static void main(String[] args) throws IOException {

		Process p = Runtime.getRuntime().exec("services.msc");

		InputStream in = p.getInputStream();

		byte[] b = new byte[1024];

		int length = 0;

		length = in.read(b);

		if (length != -1) {

			System.out.println(new String(b, 0, length));

		}
	}
}
